package com.csjung.games.gamenori.client.ioc;

import com.google.gwt.core.client.GWT;
import com.google.inject.Inject;
import com.google.inject.Provider;
import com.google.web.bindery.event.shared.EventBus;

import com.csjung.games.gaerequest.client.GaeAuthRequestTransport;
import com.csjung.games.gamenori.shared.GamenoriRequestFactory;

public class RequestFactoryProvider implements Provider<GamenoriRequestFactory> {
  private final EventBus eventBus;
  private final GaeAuthRequestTransport transport;

  @Inject
  public RequestFactoryProvider(EventBus eventBus, GaeAuthRequestTransport transport) {
    this.eventBus = eventBus;
    this.transport = transport;
  }
  public GamenoriRequestFactory get() {
    GamenoriRequestFactory requestFactory = GWT.create(GamenoriRequestFactory.class);
    requestFactory.initialize(eventBus, transport);
    return requestFactory;
  }
}